package com.trusfort.redis;

import java.util.List;

import redis.clients.jedis.Jedis;
import redis.clients.jedis.params.ScanParams;
import redis.clients.jedis.resps.ScanResult;

/**
 * Redis服务类
 * 
 * @author DangT
 * @date 2017年5月11日 下午1:41:53
 * @version V1.0
 */
public interface RedisService {

	
	public void set(String key, String value) throws Exception;

	public void set(Integer dbIndex, String key, String value) throws Exception;

	public void set(String key, String value, int seconds) throws Exception;
	
	public void set(Integer dbIndex, String key, String value, int seconds) throws Exception;
	
	
	public void set(List<String> list, int seconds) throws Exception;
	
	public void del(Integer dbIndex,List<String> list) throws Exception;
	
	public ScanResult<String> scan(Integer dbIndex, final String key,String cursor,Integer count)throws Exception;

	/**
	 * 关闭连接
	 */
	public void close();
	
	public long ttl(String key) throws Exception;

}